package com.diandian.backend.client.param;

import com.diandian.base.boot.starter.exception.DefaultException;
import com.diandian.backend.client.dto.ClientClientPermissionPageParamDTO;

import java.io.Serializable;

public class ClientClientPermissionPageParam implements Serializable {

	private Integer pageNum;
	private Integer pageSize;
	private String clientIdEql;
	private String clientIdLike;
	private Long permissionId;
	private String remarkEql;
	private String remarkLike;
	private String statusEql;
	private String statusLike;
	private Integer del;

	public void check(){
		if(this.pageNum == null || this.pageNum < 1 || this.pageSize == null || this.pageSize < 1){
			throw new DefaultException("分页参数不合法");
		}
	}

	public ClientClientPermissionPageParamDTO toDTO(){
		ClientClientPermissionPageParamDTO result = new ClientClientPermissionPageParamDTO();
		result.setPageNum(this.pageNum);
		result.setPageSize(this.pageSize);
		result.setClientIdEql(this.clientIdEql);
		result.setClientIdLike(this.clientIdLike);
		result.setPermissionId(this.permissionId);
		result.setRemarkEql(this.remarkEql);
		result.setRemarkLike(this.remarkLike);
		result.setStatusEql(this.statusEql);
		result.setStatusLike(this.statusLike);
		result.setDel(this.del);
		return result;
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public String getClientIdEql() {
		return clientIdEql;
	}
	public void setClientIdEql(String clientIdEql) {
		this.clientIdEql = clientIdEql;
	}
	public String getClientIdLike() {
		return clientIdLike;
	}
	public void setClientIdLike(String clientIdLike) {
		this.clientIdLike = clientIdLike;
	}
	public Long getPermissionId() {
		return permissionId;
	}
	public void setPermissionId(Long permissionId) {
		this.permissionId = permissionId;
	}
	public String getRemarkEql() {
		return remarkEql;
	}
	public void setRemarkEql(String remarkEql) {
		this.remarkEql = remarkEql;
	}
	public String getRemarkLike() {
		return remarkLike;
	}
	public void setRemarkLike(String remarkLike) {
		this.remarkLike = remarkLike;
	}
	public String getStatusEql() {
		return statusEql;
	}
	public void setStatusEql(String statusEql) {
		this.statusEql = statusEql;
	}
	public String getStatusLike() {
		return statusLike;
	}
	public void setStatusLike(String statusLike) {
		this.statusLike = statusLike;
	}
	public Integer getDel() {
		return del;
	}
	public void setDel(Integer del) {
		this.del = del;
	}
}
